<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>共享客户|<{$configcache['Title']}></title>
<link rel="stylesheet" type="text/css" href="__CSS__/content.css"  />
<link rel="stylesheet" type="text/css" href="__CSS__/public.css"  />
<script type="text/javascript" src="__JS__/jquery.js"></script>
<script type="text/javascript" src="__JS__/Public.js"></script>
<script type="text/javascript" src="__JS__/winpop.js"></script>
<script>
//联系人详细信息请求
function wincontactDetail(url) {
	fpopload('查看联系人信息',860,400,url);
	addDiv($('#f_pop'));
}
$(document).ready(function() {
	function Operating() {
		//查看客户信息
		$('#content #table .tr .edit').click(function(event) {
			event.preventDefault();
			var id=$(this).attr('href');
			popload('客户详细资料',840,460,'__APP__/Client/openshare_company_detail/id/'+id);
			addDiv($('#iframe_pop'));
			popclose();
		});
		//分页
		$('#page .page a').click(function(event) {
			event.preventDefault();
			var url = $(this).attr('href');
			clientajax(url);
		});
		//指定用户筛选
		$('#content #table .tr .uid').click(function(event) {
			event.preventDefault();
			var url = $(this).attr('href');
			clientajax(url);
		});
	}
	//拉取客户信息
	function clientajax(url) {
		$.get(url, function(data) {
			//回调函数
			data = eval('('+data+')');
			if (data.s=='ok') {
				//有数据的情况下
				$('#table .tr').remove();
				$('#page .page').remove();
				$('#table').append(data.html);
				$('#page').append(data.page);
			}else {
				//没有数据的情况下
				$('#table .tr').remove();
				$('#page .page').remove();
				$('#table').append(data.html);
			}
			Operating();
		});
	}
	clientajax('__APP__/Client/openshareajax?keyword=');
	var speed='';
	$('.search .text').keyup(function() {
		clearTimeout(speed);
		var value = $(this).val();
		speed = setTimeout(function() {
			clientajax('__APP__/Client/openshareajax?keyword='+value);
		},300);
	});
});
</script>
</head>
<body>
<div id="content">
	<h1>首页 > 客户管理 > 共享客户</h1>
    <h2>
    	<div class="h2_left">
        	<a href="__ACTION__" class="whole">全部</a>
        	<a href="javascript:;" class="f5" onclick="f5();">刷新</a>
            <a href="javascript:history.back();" class="Retreat">后退</a>
            <a href="javascript:history.go(1);" class="Advance">前进</a>
        </div>
        <div class="search">
            <input type="text" name="keyword" class="text" />
            <input type="submit" class="so" value="搜 索" />
            <font>小贴士：输入客户/公司名称可实时搜索</font>
        </div>
    </h2>
    <h3>
    	<a href="__APP__/Client/index">客户资料</a>
    	<a href="__APP__/Client/contact">联系人</a>
        <a href="__APP__/With/with">跟单记录</a>
        <a href="__APP__/Client/openshare" class="h3a">客户共享</a>
    </h3>
    <table id="table" border="1" bordercolor="#CCCCCC" cellpadding="0" cellspacing="0">
    	<tr>
        	<th><input type="checkbox" class="indel" value="del" /></th>
        	<th>编号</th>
            <th>公司/客户名</th>
            <th>联系人</th>
            <th>类型</th>
            <th>行业</th>
            <th>级别</th>
            <th>来源</th>
            <th>跟进情况</th>
            <th>意向</th>
            <th>共享用户</th>
            <th>最后更新</th>
            <th>操作</th>
        </tr>
    </table>
    <div id="page"></div>
</div>
</body>
</html>
